CREATE TABLE [dbo].[PlanGroup]
(
[ik_upContent] [int] NOT NULL,
[Ik_grup] [int] NOT NULL,
[Ik_Commis] [int] NULL
)
GO
ALTER TABLE [dbo].[PlanGroup] ADD CONSTRAINT [PlanGroupPrimary] PRIMARY KEY CLUSTERED  ([Ik_grup], [ik_upContent])
GO
ALTER TABLE [dbo].[PlanGroup] ADD CONSTRAINT [PlanGroupCommisForeign] FOREIGN KEY ([Ik_Commis]) REFERENCES [dbo].[Commis] ([Ik_Commis])
GO
ALTER TABLE [dbo].[PlanGroup] ADD CONSTRAINT [PlanGroupGrupForeign] FOREIGN KEY ([Ik_grup]) REFERENCES [dbo].[Grup] ([Ik_grup])
GO
ALTER TABLE [dbo].[PlanGroup] ADD CONSTRAINT [PlanGroupContent_UchPlForeign] FOREIGN KEY ([ik_upContent]) REFERENCES [dbo].[Content_UchPl] ([ik_upContent])
GO
